﻿<Controls:MetroWindow  x:Class="ExchangeTracker.Presentation.Common.NavigateContent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                       xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours;assembly=MahApps.Metro"
                       Title="{Binding Source={x:Reference NavigationContent},Path=Content.DataContext.Title}"
                       ShowMaxRestoreButton="False" ShowIconOnTitleBar="False" ShowMinButton="False"
                       FlowDirection="RightToLeft" WindowStartupLocation="CenterOwner"
                       AllowDrop="False"
                       >
  <Behaviours:StylizedBehaviors.Behaviors>
    <Behaviours:StylizedBehaviorCollection>
      <Behaviours:BorderlessWindowBehavior AutoSizeToContent="True"/>
    </Behaviours:StylizedBehaviorCollection>
  </Behaviours:StylizedBehaviors.Behaviors>
  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/yellow.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Window.Resources>
  <Controls:MetroContentControl x:Name="NavigationContent" x:FieldModifier="public"
                                VerticalAlignment="Center" HorizontalAlignment="Center"
                                MinHeight="600" MinWidth="800"
        >
    <Controls:MetroContentControl.ContentTemplate>
      <DataTemplate>
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
          </Grid.RowDefinitions>
          <ItemsControl Grid.Row="0" Grid.Column="0" Focusable="False" ItemsSource="{Binding DataContext.CommandObjects}" >
            <ItemsControl.ItemTemplate>
              <DataTemplate>
                <Button Style="{DynamicResource MetroCircleButtonStyle}" MinWidth="50" Height="50" Command="{Binding Command}" Content="{Binding Key,Converter={StaticResource ResourceConverter}}"/>
              </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
              <ItemsPanelTemplate>
                <StackPanel Orientation="Horizontal"/>
              </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
          </ItemsControl>
          <ContentControl Grid.Row="1" Grid.Column="0" Content="{Binding}"/>
        </Grid>
      </DataTemplate>
    </Controls:MetroContentControl.ContentTemplate>
  </Controls:MetroContentControl>


</Controls:MetroWindow>